package com.sunyard.pcc.dal.mapper.ext;

import com.sunyard.pcc.common.bo.SysRoleBO;
import com.sunyard.pcc.dal.mapper.SysRoleMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * MyBatis Ext Mapper for SysRole.
 */
@Mapper
@Repository
public interface SysRoleExtMapper extends SysRoleMapper {

    /**
     * 获取对应权限条数
     * @param roles
     * @return
     */
    Integer selectRolesCount(List<Long> roles);


    /**
     * 根据用户Id查询用户对应权限
     * @param userId
     * @return
     */
    List<SysRoleBO> selectUserRolesByUserId(@Param(value = "userId") Long userId);

}